<?php
class YuyueManageAction extends CommonAction {
	public function index() {
		$this->display();
	}
	public function data() {
		$method = $_POST;
		$methodget = $_GET;
		$d = getcity();
		$yObj = D('yuyue');
		$userinfo = Session::get('userinfo');
		switch($method['do']){
			case 'binzhong':
				R('Binzhong','data');
				break;
			default:
				switch($userinfo['type_id']){
					case 1:

					break;
					case 2:

					break;
					case 3:
						$map['uid'] = $userinfo['id'];
					break;
				}
				foreach($yObj->where($map)->select() as $v){
					$v['date'] = toDate($v['date']);
					$y[] = $v;
				}
				$count = $yObj->where($map)->count();
				echo json_encode(array('list'=>$y,'count'=>$count));
			break;
		}
	}
	public function search() {

	}
}